<?php

use yii\db\Migration;

/**
 * Handles the creation of table `rel_attachment_and_upload_file`.
 */
class m170323_035530_create_rel_attachment_and_upload_file_table extends Migration
{
    /**
     * @inheritdoc
     */
    public function safeUp()
    {
        $this->createTable('rel_attachment_and_upload_file', [
            'attachment_id' => $this->integer()->comment('附件序号'),
            'upload_file_id'=>$this->integer()->comment('文件符号'),
        ],'ENGINE=INNODB');
        $this->addPrimaryKey('primaryKey','rel_attachment_and_upload_file',['attachment_id','upload_file_id']);
    }

    /**
     * @inheritdoc
     */
    public function safeDown()
    {
        $this->dropTable('rel_attachment_and_upload_file');
    }
}
